/*
 * Copyright (c) 2022 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

// const validator = require('./validator')
import validator from './validator'

const BASE_COUNT=100000
const LONG_COUNT=10000000
 
/* contains Test */
function contains_Test_01() {   
    let str = '本demo是基于openHarmony系统下使用三方js库validator.js,validator.js是字符串验证器和清理器的库Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,  either express or implied.See the License for the specific language governing permissions and limitations under the License   Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at fofooofoooofoooo dfasd46354adf35sad4fasd64g5asdf1.lj afkdsofpn 4oqrmnaoef agdsfaklsdfk-p34-0-9hsdf sfdgifdsnmf[o4 fd4as6f98sd4 44598f4 9fd489bsamiaofdsja9f9d89384nfja fasdfgfhd1h451hdf4h55 34r5ts14fa65 ad4fa5sdf1 af54dsg74fd8g7r7g4re989a4df98af4asd8fds1f6asdf1'
    let seed = "Fooofoo"
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.contains(str, seed, {ignoreCase: true})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_contains(ignoreCase_true): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* contains Test */
function contains_Test_02() {   
    let str = '本demo是基于openHarmony系统下使用三方js库validator.js,validator.js是字符串验证器和清理器的库Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,  either express or implied.See the License for the specific language governing permissions and limitations under the License   Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at fofooofoooofoooo dfasd46354adf35sad4fasd64g5asdf1.lj afkdsofpn 4oqrmnaoef agdsfaklsdfk-p34-0-9hsdf sfdgifdsnmf[o4 fd4as6f98sd4 44598f4 9fd489bsamiaofdsja9f9d89384nfja fasdfgfhd1h451hdf4h55 34r5ts14fa65 ad4fa5sdf1 af54dsg74fd8g7r7g4re989a4df98af4asd8fds1f6asdf1'
    let seed = "Fooofoo"
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.contains(str, seed, {ignoreCase: false})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_contains(ignoreCase_false): " + time +" ms")  
    areEqual(false, result) 
   
    // print(result)
} 
/* contains Test */
function contains_Test_03() {
    let str = `0101010101010lemon1010101010101010101010grape1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010apple10101010101010101010101010101010101010101010101010101`
    let seed = "apple"
    let result
    let startTime = Date.now()
    for (let i = 0; i < BASE_COUNT; i++) {
        result = validator.contains(str, seed, { ignoreCase: false, minOccurrences: 1})
    }
    let endTime = Date.now()
    let time = endTime - startTime
    print("validator_contains(binary): " + time + " ms")
    areEqual(true, result)
}
/* contains Test */
function contains_Test_04() {
    let str = '本demo是基于openHarmony系统下使用三方js库validator.js,validator.js是字符串验证器和清理器的库Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,  either express or implied.See the License for the specific language governing permissions and limitations under the License   Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at fofooofoooofoappleooo dfasd46354adf35sad4fasd64g5asdf1.lj afkappledsofpn 4oqrmnaoef agdsfaklsdfk-p34-0-9hsdf sfdgifdsnmf[o4 fd4as6f98sd4 44598f4 9fd489bsamiaofdsja9f9d89384nfja fasdfgfhd1h451hdf4h55 34r5ts14fa65 ad4fa5sdf1 af54dsg74fd8g7r7g4re989a4df98af4asd8fds1f6asdf1'
    let seed = "apple"
    let result
    let startTime = Date.now()
    for (let i = 0; i < BASE_COUNT; i++) {
        result = validator.contains(str, seed, { ignoreCase: true, minOccurrences: 2 })
    }
    let endTime = Date.now()
    let time = endTime - startTime
    print("validator_contains(ignoreCase,minOccurrences): " + time + " ms")
    areEqual(true, result)
    //    print(result)
}
/* equals Test */
function equals_Test() {   
    let str = '本demo是基于openHarmony系统下使用三方js库validator.js,validator.js是字符串验证器和清理器的库Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,  either express or implied.See the License for the specific language governing permissions and limitations under the License   Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at fofooofoooofoooo dfasd46354adf35sad4fasd64g5asdf1.lj afkdsofpn 4oqrmnaoef agdsfaklsdfk-p34-0-9hsdf sfdgifdsnmf[o4 fd4as6f98sd4 44598f4 9fd489bsamiaofdsja9f9d89384nfja fasdfgfhd1h451hdf4h55 34r5ts14fa65 ad4fa5sdf1 af54dsg74fd8g7r7g4re989a4df98af4asd8fds1f6asdf1'
    let scomparisoneed = "本demo是基于openHarmony系统下使用三方js库validator.js,validator.js是字符串验证器和清理器的库Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,  either express or implied.See the License for the specific language governing permissions and limitations under the License   Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at fofooofoooofoooo dfasd46354adf35sad4fasd64g5asdf1.lj afkdsofpn 4oqrmnaoef agdsfaklsdfk-p34-0-9hsdf sfdgifdsnmf[o4 fd4as6f98sd4 44598f4 9fd489bsamiaofdsja9f9d89384nfja fasdfgfhd1h451hdf4h55 34r5ts14fa65 ad4fa5sdf1 af54dsg74fd8g7r7g4re989a4df98af4asd8fds1f6asdf1" 
    let result
    let startTime = Date.now()
    for (let i=0;i<LONG_COUNT;i++) {
        result = validator.equals(str, scomparisoneed)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_equals: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Checks if the string is after the specified date */
function isAfter_Test_01() {    
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isAfter('2022-07-18')
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isAfter(comparisonDate): " + time +" ms")  
    areEqual(false, result) 
   
    // print(result)
} 
/* Checks if the string is after the specified date */
function isAfter_Test_02() {
    let result
    let startTime = Date.now()
    for (let i = 0; i < BASE_COUNT; i++) {
        result = validator.isAfter('2020年07月18日', '2022年04月10日')
    }
    let endTime = Date.now()
    let time = endTime - startTime
    print("validator_isAfter(yyyyMMdd_CN): " + time + " ms")

    areEqual(false, result)

    // print(result)
}
/* Checks if the string is after the specified date */
function isAfter_Test_03() {
    let result
    let startTime = Date.now()
    for (let i = 0; i < BASE_COUNT; i++) {
        result = validator.isAfter('2024/08/18')
    }
    let endTime = Date.now()
    let time = endTime - startTime
    print("validator_isAfter(yyyy/MM/dd): " + time + " ms")

    areEqual(true, result)

    // print(result)
}
/* Checks if the string is after the specified date */
function isAfter_Test_04() {
    let result
    let startTime = Date.now()
    for (let i = 0; i < BASE_COUNT; i++) {
        result = validator.isAfter(Date.parse('2020年07月18日').toString(), Date.parse('2022年04月10日').toString())
    }
    let endTime = Date.now()
    let time = endTime - startTime
    print("validator_isAfter(timestamp): " + time + " ms")

    areEqual(false, result)

    // print(result)
}
/* Checks if the string is after the specified date */
function isAfter_Test_05() {    
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isAfter('2015-09-17', {comparisonDate: 'invalid date'})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isAfter(invalid date): " + time +" ms")  
    areEqual(false, result) 
   
    // print(result)
} 

/* Check if the string contains only letters (a-zA-Z) */
function isAlpha_Test_01() {    
    let str = 'môjľúbímmäkčeňstĹpvŕbaňorimberkťavažanétaĎábelskéódydertheLicenseisdistributedonanBASISWITHOUTWARRANTIESORCONDITIONSOFANYKINDagfdasfasdfnfsfdadrwejydfghsdfgsadfgsdfonanBASISWITHOUTWARRANTIESORCONDITIONSOFANYKINDagfdasfasdfnfsfdadrwejydfghsdfgsadfgsdfonanBASISWITHOUTWARRANTIESORCONDITIONSOFANYKINDagfdasfasdfnfsfdadrwejydfghsdfgsadfgsdffdadrwejydfghsdfgsadfgsdfonanBASISWITHOUTWARRANTIESORCONDITIONSOFANYKINDagfdasfasdfnfsfdadrwejydfghsdfgsadfgsdfonanBASISWITHOUTWARRANTIESORCONDITIONSOFANYKINDagfdasfasdfnfsfdadrwejydfghsdfgsadfgsdf'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isAlpha(str,'sk-SK')
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isAlpha(str,locale): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check if the string contains only letters (a-zA-Z) */
function isAlpha_Test_02() {    
    let str = 'môjľúbímmäkčeňstĹpvŕbaňorimberkťavažanétaĎábelskéódydertheLicenseisdistributedonanBASISWITHOUTWARRANTIESORCONDITIONSOFANYKINDagfdasfasdfnfsfdadrwejydfghsdfgsadfgsdfonanBASISWITHOUTWARRANTIESORCONDITIONSOFANYKINDagfdasfasdfnfsfdadrwejydfghsdfgsadfgsdfonanBASISWITHOUTWARRANTIESORCONDITIONSOFANYKINDagfdasfasdfnfsfdadrwejydfghsdfgsadfgsdffdadrwejydfghsdfgsadfgsdfonanBASISWITHOUTWARRANTIESORCONDITIONSOFANYKINDagfdasfasdfnfsfdadrwejydfghsdfgsadfgsdfonanBASISWITHOUTWARRANTIESORCONDITIONSOFANYKINDagfdasfasdfnfsfdadrwejydfghsdfgsadfgsdf'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isAlpha(str,'sk-SK', {ignore:'- /'})// ignore [space-/]
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isAlpha(str,locale,ignore_string): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check if the string contains only letters (a-zA-Z) */
function isAlpha_Test_03() {    
    let str = 'môjľúbímmäkčeňstĹpvŕbaňorimberkťavažanétaĎábelskéódydertheLicenseisdistributedonanBASISWITHOUTWARRANTIESORCONDITIONSOFANYKINDagfdasfasdfnfsfdadrwejydfghsdfgsadfgsdfonanBASISWITHOUTWARRANTIESORCONDITIONSOFANYKINDagfdasfasdfnfsfdadrwejydfghsdfgsadfgsdfonanBASISWITHOUTWARRANTIESORCONDITIONSOFANYKINDagfdasfasdfnfsfdadrwejydfghsdfgsadfgsdffdadrwejydfghsdfgsadfgsdfonanBASISWITHOUTWARRANTIESORCONDITIONSOFANYKINDagfdasfasdfnfsfdadrwejydfghsdfgsadfgsdfonanBASISWITHOUTWARRANTIESORCONDITIONSOFANYKINDagfdasfasdfnfsfdadrwejydfghsdfgsadfgsdf'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isAlpha(str,'sk-SK', {ignore:new RegExp('/[\s/-]/g')})// ignore [space -]
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isAlpha(str,locale,ignore_RegExp): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check if the string contains only letters and numbers (a-zA-Z0-9) */
function isAlphanumeric_Test_01() {    
    let str = '123àéèìîóòù123correntiDEFINIZIONE321compil123azionemet23rópès56caPÉS45CAgen45îWARRANTIESsoftwaredistributedundertheLicenseisdistributedonanBASISWITHOUTWARRANTIESORCONDITIONSOFANYKINDagdsf45380agdj8f9as8df3r421faed6a5sg5ad6f4sa6d5g46a5df423raewtarhgafsd65f4ds6f5a46sd4fa5sd6f4as6d51g6d5a4h65f4h85439483654r6adf16sda4f9837549g4sf6g46sdf5g46s5dfg4sd9f68g6sfdg416798rt45s6f4g1f56d4ga65df4a65sd4f65asd4f6asd54f6a5sd4f65asdf54asd65f465asfd4adsfasd484f98sad4f98we4f65654ey56j4y51v5dsa9se48wqer56565HRGWDSFDSFDFEW'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isAlphanumeric(str,'it-IT')
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isAlphanumeric(str,locale): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check if the string contains only letters and numbers (a-zA-Z0-9) */
function isAlphanumeric_Test_02() {    
    let str = '123àéèìîóòù123correntiDEFINIZIONE321compil123azionemet23rópès56caPÉS45CAgen45îWARRANTIESsoftwaredistributedundertheLicenseisdistributedonanBASISWITHOUTWARRANTIESORCONDITIONSOFANYKINDagdsf45380agdj8f9as8df3r421faed6a5sg5ad6f4sa6d5g46a5df423raewtarhgafsd65f4ds6f5a46sd4fa5sd6f4as6d51g6d5a4h65f4h85439483654r6adf16sda4f9837549g4sf6g46sdf5g46s5dfg4sd9f68g6sfdg416798rt45s6f4g1f56d4ga65df4a65sd4f65asd4f6asd54f6a5sd4f65asdf54asd65f465asfd4adsfasd484f98sad4f98we4f65654ey56j4y51v5dsa9se48wqer56565HRGWDSFDSFDFEW'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isAlphanumeric(str,'it-IT', {ignore:'- /'})// ignore [space-/]
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isAlphanumeric(str,locale,ignore_string): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check if the string contains only letters and numbers (a-zA-Z0-9) */
function isAlphanumeric_Test_03() {    
    let str = '123àéèìîóòù123correntiDEFINIZIONE321compil123azionemet23rópès56caPÉS45CAgen45îWARRANTIESsoftwaredistributedundertheLicenseisdistributedonanBASISWITHOUTWARRANTIESORCONDITIONSOFANYKINDagdsf45380agdj8f9as8df3r421faed6a5sg5ad6f4sa6d5g46a5df423raewtarhgafsd65f4ds6f5a46sd4fa5sd6f4as6d51g6d5a4h65f4h85439483654r6adf16sda4f9837549g4sf6g46sdf5g46s5dfg4sd9f68g6sfdg416798rt45s6f4g1f56d4ga65df4a65sd4f65asd4f6asd54f6a5sd4f65asdf54asd65f465asfd4adsfasd484f98sad4f98we4f65654ey56j4y51v5dsa9se48wqer56565HRGWDSFDSFDFEW'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isAlphanumeric(str,'it-IT',{ignore:new RegExp('/[\s/-]/g')})// ignore [space -]
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isAlphanumeric(str,locale,ignore_RegExp): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Checks if the string contains only ASCII characters */
function isAscii_Test() {    
    let str = 'foobar0987654321test@example.com1234abcDEF%nwgfs56417465575+_()**&*^%^$%$%@!~`[]\';:"|{}./.,<>?415665654GAFADSFADFDHTRJYTIUIOfadsfadshytutupmgzdq+-*/abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isAscii(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isAscii: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 
/* Checks if the string contains only ASCII characters */
function isAscii_Test_02() {
    let str = "01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101"
    let result
    let startTime = Date.now()
    for (let i = 0; i < BASE_COUNT; i++) {
        result = validator.isAscii(str)
    }
    let endTime = Date.now()
    let time = endTime - startTime
    print("validator_isAscii(binary): " + time + " ms")
    areEqual(true, result)

    // print(result)
}
/* Check whether the string is base32 encoded */
function isBase32_Test_01() {    
    let str = 'IJQXGZJTGLS3BBXEXO56NBEP4WWZPZ5MU3SLRMXGRSE6PBNH4WWZP2EKQLUL7G7IUGGOLCEH4WEIN354RTS3TNXFWCDONL4P4S4KVZNNS7UIVAXFV646LOUU46NIJZF2RTUL7G7FRC3OLAF4566IRZFYRXULNMZY42XZJZ4JXHU2XGHEXWG6RINFGDX3ZCPEXCZORAMU5C23PZU5UXX3ZDHGRSE6PBNHGXTK7FHHRG46JOEA465YJ2F7TPUKDDHFRCD6LCEG566IZZNZW3S3BBXGV6H6PO4E4S5IZ2F7TPSYRNXFQC6ORPNM42G2FZUISDSY3APIX6N6LCFW42O2LZNPXHS3VFBTGLSLRKXFR6X6NCMT4WG3BZNNS7T2ZJXEXCW6PGUE4S4IBZFYVLRYBAQ='
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isBase32(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isBase32(str): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
}

/* Check whether the string is base32 encoded */
function isBase32_Test_02() {    
    let str = 'IJQXGZJTGLS3BBXEXO56NBEP4WWZPZ5MU3SLRMXGRSE6PBNH4WWZP2EKQLUL7G7IUGGOLCEH4WEIN354RTS3TNXFWCDONL4P4S4KVZNNS7UIVAXFV646LOUU46NIJZF2RTUL7G7FRC3OLAF4566IRZFYRXULNMZY42XZJZ4JXHU2XGHEXWG6RINFGDX3ZCPEXCZORAMU5C23PZU5UXX3ZDHGRSE6PBNHGXTK7FHHRG46JOEA465YJ2F7TPUKDDHFRCD6LCEG566IZZNZW3S3BBXGV6H6PO4E4S5IZ2F7TPSYRNXFQC6ORPNM42G2FZUISDSY3APIX6N6LCFW42O2LZNPXHS3VFBTGLSLRKXFR6X6NCMT4WG3BZNNS7T2ZJXEXCW6PGUE4S4IBZFYVLRYBAQ='
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isBase32(str, { crockford: true })
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isBase32(str,crockford): " + time +" ms")  
    areEqual(false, result) 
   
    // print(result)
}
/* Check whether the string is base32 encoded */
function isBase32_Test_03() {
    let str = `01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101`
    let result
    let startTime = Date.now()
    for (let i = 0; i < BASE_COUNT; i++) {
        result = validator.isBase32(str, { crockford: true })
    }
    let endTime = Date.now()
    let time = endTime - startTime
    print("validator_isBase32(binary): " + time + " ms")
    areEqual(true, result)

    // print(result)
}
/* Check whether the string is base58 encoded */
function isBase58_Test() {    
    let str = '2LEbkau8tFtHGHLwws4FZi9vq3cKTVKHVhpAJxcBZvDXqizqFJuxRtXfLV9y32H6vazDfXvSYErxFkVs8GifZCjj3ByYTJVMZjCieGJXuqhowF7LQLiGjDVMsyxNyMrwmbBWoKvtnzPSbj8eghiAYAKj6a5nMNzsADGgyC9EYsbK8rp4m3QNz7th3rmnTmb41FTcg3jc3bnwBU4Tn5jNhpKAKuqP3zSDUSQY6ydQDkiBUUwsmkxLDQV5dhMmrmYgTtppvCrkFwuQSFP7uup2K7avkT1Usww1c2HXonTEX3kdVGiBNWcsVVVUGTXS7g25XWz3MLfFeBcZX51McdnPjoVQfiE9MFDSTu24CNW52xYrU8T76ysf8Eo2uV4eManigLs9si7eK8onMmFHAaHp3FkeUYKR1FAziY8AJFNTpj98KDCYJ95mBTue5xD68MoEyJdUnN4dpNM17cmHHTaySL39qc8AEdQnjmNxUmXk7qzTM6xBi6gkXUnm3U6aFnthAoQfqc7Dbcei9aC6gYVrv8im7WXvrXSQNueHewRdn63VuGtJtdwLvPTvG8kzBzVxJX273wdcNiLxKLU1Xxe759N6p1unpu2CWkQkAvmYK8DkpqbHiJRtsbCJtVBwxWzVKjyFmuTiSimGJtAo6NsskwbNvhrZMWARcw4tQ461Ns3hDaqwdBs4cP81a7mZn4rsv5y8JoXbSnLUXz5g3yirWjRaZxbdnevRp4W4qs6174vrB8PiP2ptmdz27KiQ'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isBase58(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isBase58: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 
/* Check whether the string is base58 encoded */
function isBase58_Test_02() {
    let str = "01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101"
    let result
    let startTime = Date.now()
    for (let i = 0; i < BASE_COUNT; i++) {
        result = validator.isBase58(str)
    }
    let endTime = Date.now()
    let time = endTime - startTime
    print("validator_isBase58(binary): " + time + " ms")
    areEqual(false, result)

    // print(result)
}
/* Check whether the string is base64 encoded */
function isBase64_Test_01() {    
    let str = 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuMPNS1Ufof9EW/M98FNwUAKrwflsqVxaxQjBQnHQmiI7Vac40t8x7pIb8gLGV6wL7sBTJiPovJ0V7y7oc0YerhKh0Rm4skP2z/jHwwZICgGzBvA0rH8xlhUiTvcwDCJ0kc+fh35hNt8srZQM4619FTgB66Xmp4EtVyhpQV+t02g6NzK72oZI0vnAvqhpkxLeLiMCyrI416wHm5TkukhxQmcL2a6hNOyu0ixX/x2kSFXApEnVrJ+/IxGyfyw8kf4N2IZpW5nEP847lpfj0SZZFwrd1mnfnDbYohX2zRptLy2ZUn06Qo9pkG5ntvFEPo9bfZeULtjYzIl6K8gJ2uGZHQIDAQAB'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isBase64(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isBase64(str): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is base64 encoded */
function isBase64_Test_02() {    
    let str = 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuMPNS1Ufof9EW/M98FNwUAKrwflsqVxaxQjBQnHQmiI7Vac40t8x7pIb8gLGV6wL7sBTJiPovJ0V7y7oc0YerhKh0Rm4skP2z/jHwwZICgGzBvA0rH8xlhUiTvcwDCJ0kc+fh35hNt8srZQM4619FTgB66Xmp4EtVyhpQV+t02g6NzK72oZI0vnAvqhpkxLeLiMCyrI416wHm5TkukhxQmcL2a6hNOyu0ixX/x2kSFXApEnVrJ+/IxGyfyw8kf4N2IZpW5nEP847lpfj0SZZFwrd1mnfnDbYohX2zRptLy2ZUn06Qo9pkG5ntvFEPo9bfZeULtjYzIl6K8gJ2uGZHQIDAQAB'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isBase64(str, { urlSafe: true })
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isBase64(str,urlSafe): " + time +" ms")  
    areEqual(false, result) 
   
    // print(result)
} 

/* Checks whether the string is a date earlier than the specified date */
function isBefore_Test() {    
    let str = '2010-08-04'
    let date2 = '03/29/2024'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isBefore(str,date2)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isBefore: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 
/* Checks whether the string is a date earlier than the specified date */
function isBefore_Test_02() {
    let str = Date.parse('2010-08-04').toString();
    let date2 = Date.parse('03/29/2024').toString();
    let result
    let startTime = Date.now()
    for (let i = 0; i < BASE_COUNT; i++) {
        result = validator.isBefore(str, date2)
    }
    let endTime = Date.now()
    let time = endTime - startTime
    print("validator_isBefore(timestamp): " + time + " ms")
    areEqual(false, result)

    // print(result)
}
/* Check whether the string is BIC (Bank Identification number) or SWIFT code */
function isBIC_Test() {    
    let str = 'SBICKEN1345'         //银行识别代码是由电脑可以自动判读的八位或是十一位英文字母或阿拉伯数字组成
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isBIC(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isBIC: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Checks whether the string is a Boolean value */
function isBoolean_Test_01() {    
    let str = '0'
    let result
    let startTime = Date.now()
    for (let i=0;i<LONG_COUNT;i++) { 
        result = validator.isBoolean(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isBoolean(str): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Checks whether the string is a Boolean value */
function isBoolean_Test_02() {    
    let str = 'yes'
    let result
    let startTime = Date.now()
    for (let i=0;i<LONG_COUNT;i++) { 
        result = validator.isBoolean(str, { loose: true })
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isBoolean(str,loose): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 
/* Checks whether the string is a Boolean value */
function isBoolean_Test_03() {
    let str = 'false'
    let result
    let startTime = Date.now()
    for (let i = 0; i < LONG_COUNT; i++) {
        result = validator.isBoolean(str, { loose: true })
    }
    let endTime = Date.now()
    let time = endTime - startTime
    print("validator_isBoolean(false): " + time + " ms")
    areEqual(true, result)

    // print(result)
}
/* Check whether the string is a valid BTC address */
function isBtcAddress_Test() {    
    let str = 'bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isBtcAddress(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isBtcAddress: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check that the length of the string (UTF-8 bytes) is within a range */
function isByteLength_Test_01() {    
    let str = 'Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,  either express or implied.See the License for the specific language governing permissions and limitations under the License   Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at fofooofoooofoooo.'
    let result 
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isByteLength(str,1,482)  
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isByteLength: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 
/* Check that the length of the string (UTF-8 bytes) is within a range */
function isByteLength_Test_02() {
    let str = `1268193682197490328590436549376894799003820043215124126819368219749032859043654937689479900382004321512412681936821974903285904365493768947990038200432151241268193682197490328590436549376894799003820043215124126819368219749032859043654937689479900382004321512412681936821974903285904365493768947990038200432151241268193682197490328590436549376894799003820043215124126819368219749032859043654937689479900382004321512412681936821974903285904365493768947990038200432151241268193682197490328590436549376894799003820043215124`;
    let result
    let startTime = Date.now()
    for (let i = 0; i < BASE_COUNT; i++) {
        result = validator.isByteLength(str, {min: 1, max: 576})
    }
    let endTime = Date.now()
    let time = endTime - startTime
    print("validator_isByteLength(numString): " + time + " ms")
    areEqual(true, result)

    // print(result)
}
/* Check that the length of the string (UTF-8 bytes) is within a range */
function isByteLength_Test_03() {    
    let str = 'Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,  either express or implied.See the License for the specific language governing permissions and limitations under the License   Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at32d .'
    let result 
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isByteLength(str,{ min: 2})  
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isByteLength(min2): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 
/* Check that the length of the string (UTF-8 bytes) is within a range */
function isByteLength_Test_04() {    
    let str = 'Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,  either express or implied.See the License for the specific language governing permissions and limitations under the License   Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at32d .'
    let result 
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isByteLength(str,{ max: 2})  
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isByteLength(max2): " + time +" ms")  
    areEqual(false, result) 
   
    // print(result)
} 

/* Check if the string is a credit card number */
function isCreditCard_Test_01() {    
    let str = '4929 7226 5379 7141' 
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isCreditCard(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isCreditCard(str): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check if the string is a credit card number */
function isCreditCard_Test_02() {    
    let str = '4929 7226 5379 7141' 
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isCreditCard(str, {provider: 'Visa'})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isCreditCard(str,provider): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Checks if the string is a valid monetary amount */
function isCurrency_Test_01() {    
    let str = '$100,234,567.89'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isCurrency(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isCurrency: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Checks if the string is a valid monetary amount */
function isCurrency_Test_02() {    
    let str = '$100,234,567.89'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isCurrency(str,{allow_decimal: false,})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isCurrency(allow_decimal): " + time +" ms")  
    areEqual(false, result) 
   
    // print(result)
} 
/* Checks if the string is a valid monetary amount */
function isCurrency_Test_03() {    
    let str = '¥630,234,567.8943'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isCurrency(str,{ symbol: '$'})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isCurrency(symbol): " + time +" ms")  
    areEqual(false, result) 
   
    // print(result)
} 
/* Checks if the string is a valid monetary amount */
function isCurrency_Test_04() {    
    let str = 'kr. 6.954.231'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isCurrency(str,{symbol: 'kr.',negative_sign_before_digits: true,thousands_separator: '.',decimal_separator: ',',allow_space_after_symbol: true,})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isCurrency(allow_space_after_symbol): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 
/* Checks if the string is a valid monetary amount */
function isCurrency_Test_05() {    
    let str = '($6,954,231)'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isCurrency(str,{parens_for_negatives: true,})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isCurrency(parens_for_negatives): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 
/* Checks if the string is a valid monetary amount */
function isCurrency_Test_06() {    
    let str = '-$10,123.4'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isCurrency(str,{digits_after_decimal: [1, 3]})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isCurrency(digits_after_decimal): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 
/* Checks if the string is a valid monetary amount */
function isCurrency_Test_07() {    
    let str = '¥-10567.01'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isCurrency(str,{symbol: '¥',negative_sign_before_digits: true,})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isCurrency(negative_sign_before_digits): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 
/* Checks if the string is a valid monetary amount */
function isCurrency_Test_08() {    
    let str = '$10,123.45-'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isCurrency(str,{negative_sign_after_digits: true,})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isCurrency(negative_sign_after_digits): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 
/* Checks if the string is a valid monetary amount */
function isCurrency_Test_09() {    
    let str = '123,456.78'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isCurrency(str,{symbol: '¥',allow_negatives: false,})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isCurrency(allow_negatives): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 
/* Checks if the string is a valid monetary amount */
function isCurrency_Test_10() {    
    let str = 'R$ 1.400,00'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isCurrency(str,{symbol: 'R$',require_symbol: true,allow_space_after_symbol: true,symbol_after_digits: false,thousands_separator: '.',decimal_separator: ',',})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isCurrency(require_symbol): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is in data uri format */
function isDataURI_Test() {    
    let str = 'data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22100%22%20height%3D%22100%22%3E%3Crect%20fill%3D%22%2300B1FF%22%20width%3D%22100%22%20height%3D%22100%22%2F%3E%3C%2Fsvg%3E'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isDataURI(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isDataURI: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is valid. For example, [2002-07-15, new Date()]. */
function isDate_Test_01() {    
    let str = new Date('2014-03-15')
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isDate(str) 
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isDate(str): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is valid. For example, [2002-07-15, new Date()]. */
function isDate_Test_02() {    
    let str = '15-07-2002'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isDate(str, { format: 'DD/MM/YYYY' }) 
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isDate(str,format): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
}

/* Check whether the string is valid. For example, [2002-07-15, new Date()]. */
function isDate_Test_03() {    
    let str = '2020/01/15'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isDate(str, {strictMode: true }) 
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isDate(str,strictMode): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
}
/* Check whether the string is valid. For example, [2002-07-15, new Date()]. */
function isDate_Test_04() {
    let str = Date.parse('2020/01/15')
    let result
    let startTime = Date.now()
    for (let i = 0; i < BASE_COUNT; i++) {
        result = validator.isDate(str, { strictMode: true })
    }
    let endTime = Date.now()
    let time = endTime - startTime
    print("validator_isDate(timestamp): " + time + " ms")
    areEqual(false, result)

    // print(result)
}
/* Check whether the string is valid.   */
function isDate_Test_05() {    
    let str = '01.15.2020'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isDate(str, {format: 'MM.DD.YYYY', delimiters: ['.'], strictMode: true}) 
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isDate(format,delimiters,strictMode): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
}
/* Check whether the string is valid.   */
function isDate_Test_06() {    
    let str = new Date()
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isDate(str, {delimiters: ['/', ' ']}) 
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isDate(delimiters): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
}
/* Check whether the string is valid.   */
function isDate_Test_07() {    
    let str = '15-07-2002'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isDate(str, {format: 'DD/MM/YYYY'}) 
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isDate(format): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
}
/* Check whether the string represents a decimal number, such as 0.1,.3, 1.1, 1.00003, or 4.0 */
function isDecimal_Test_01() {    
    let str = '0.0000000000001'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isDecimal(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isDecimal(str): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string represents a decimal number, such as 0.1,.3, 1.1, 1.00003, or 4.0 */
function isDecimal_Test_02() {    
    let str = '0.0000000000001'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isDecimal(str, {force_decimal: true})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isDecimal(str,force_decimal): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string represents a decimal number, such as 0.1,.3, 1.1, 1.00003, or 4.0 */
function isDecimal_Test_03() {    
    let str = '-00123'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isDecimal(str, {decimal_digits: '2,3'})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isDecimal(str,decimal_digits): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 
/* Check whether the string represents a decimal number, such as 0.1,.3, 1.1, 1.00003, or 4.0 */
function isDecimal_Test_04() {
    let str = '+123'
    let result
    let startTime = Date.now()
    for (let i = 0; i < BASE_COUNT; i++) {
        result = validator.isDecimal(str, { force_decimal: true, decimal_digits: '2,9' })
    }
    let endTime = Date.now()
    let time = endTime - startTime
    print("validator_isDecimal(str,force_decimal,decimal_digits): " + time + " ms")
    areEqual(false, result)

    // print(result)
}
/* Checks whether the string is a number that is divisible by another */
function isDivisibleBy_Test() {    
    let str = '4235452343613456'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isDivisibleBy(str,2)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isDivisibleBy: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is an EAN (European Article Number) */
function isEAN_Test() {    
    let str = '20012345678909'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isEAN(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isEAN: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is email */
function isEmail_Test_01() {    
    let str = 'some.name.midd.leNa.me.and.locality+extension@GoogleMail.com'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isEmail(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isEmail(str): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is email */
function isEmail_Test_02() {    
    let str = 'some.name.midd.leNa.me.and.locality+extension@GoogleMail.com'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isEmail(str, {allow_display_name: true})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isEmail(str,allow_display_name): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is email */
function isEmail_Test_03() {    
    let str = 'Some Middle Name <some.name.midd.leNa.me+extension@GoogleMail.com>'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isEmail(str, {require_display_name: true})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isEmail(str,require_display_name): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is email */
function isEmail_Test_04() {    
    let str = 'some.name.midd.leNa.me+extension@GoogleMail.com'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isEmail(str, {allow_utf8_local_part: false})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isEmail(str,allow_utf8_local_part): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is email */
function isEmail_Test_05() {    
    let str = 'email@255.255.255.255'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isEmail(str, {allow_ip_domain: true})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isEmail(str,allow_ip_domain): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is email */
function isEmail_Test_06() {    
    let str = 'foo.bar@googlemail.com'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isEmail(str, {domain_specific_validation: true})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isEmail(str,domain_specific_validation): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
}

/* Check whether the string is email */
function isEmail_Test_07() {    
    let str = 'email@gmail.com'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isEmail(str, {blacklisted_chars: 'abc'})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isEmail(str,blacklisted_chars): " + time +" ms")  
    areEqual(false, result) 
   
    // print(result)
} 

/* Check whether the string is email */
function isEmail_Test_08() {    
    let str = 'foo+bar@gmail.com'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isEmail(str, {host_blacklist: ['gmail.com', 'foo.bar.com']})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isEmail(str,host_blacklist): " + time +" ms")  
    areEqual(false, result) 
   
    // print(result)
} 

/* Check whether the length of the string is zero */
function isEmpty_Test_01() {    
    let str = '               '
    let result
    let startTime = Date.now()
    for (let i=0;i<LONG_COUNT;i++) {
        result = validator.isEmpty(str, {ignore_whitespace: true})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isEmpty(ignore_whitespace_true): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the length of the string is zero */
function isEmpty_Test_02() {    
    let str = '               '
    let result
    let startTime = Date.now()
    for (let i=0;i<LONG_COUNT;i++) {
        result = validator.isEmpty(str, {ignore_whitespace: false})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isEmpty(ignore_whitespace_false): " + time +" ms")  
    areEqual(false, result) 
   
    // print(result)
} 


/* Check if the string is an Ethereum address. Do not validate the address checksum */
function isEthereumAddress_Test() {    
    let str = '0xFCb5AFB808b5679b4911230Aa41FfCD0cd335b42'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isEthereumAddress(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isEthereumAddress: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is a floating point value */
function isFloat_Test_01() {    
    let str = '-0.22250738585072011e-307'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isFloat(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isFloat(str): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is a floating point value */
function isFloat_Test_02() {    
    let str = '-0.22250738585072011e-307'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isFloat(str, {gt: -5.5,lt: 10})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isFloat(str,gl,lt): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 
/* Check whether the string is a floating point value */
function isFloat_Test_03() {    
    let str = '3.7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isFloat(str, {min: 3.7,})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isFloat(min): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 
/* Check whether the string is a floating point value */
function isFloat_Test_04() {    
    let str = '0.337547891534851479847395013495871094694673331892461237040156456456523446552346554236545434565426354456324452634564234562534456534456234984529834759327698324759'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isFloat(str, {min: 0.1,max: 1.0,})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isFloat(min,max): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check if the string is a fully qualified domain name (for example, domain.com) */
function isFQDN_Test_01() {    
    let str = 'xn--froschgrn-x9a.com'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isFQDN(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isFQDN(str): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check if the string is a fully qualified domain name (for example, domain.com) */
function isFQDN_Test_02() {    
    let str = '*.shop.example.com'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isFQDN(str, {allow_wildcard: true})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isFQDN(str,allow_wildcard): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check if the string is a fully qualified domain name (for example, domain.com) */
function isFQDN_Test_03() {    
    let str = '192.168.0.9999'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isFQDN(str,  {
            allow_numeric_tld: true, require_tld: false
          })
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isFQDN(str,allow_numeric_tld,require_tld): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check if the string is a fully qualified domain name (for example, domain.com) */
function isFQDN_Test_04() {    
    let str = 'as1s.sad3s.ssa2d.'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isFQDN(str,  {
            allow_trailing_dot: true, allow_underscores: true, allow_numeric_tld: true
          })
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isFQDN(str,allow_underscores,allow_numeric_tld): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 
/* Check if the string is a fully qualified domain name (for example, domain.com) */
function isFQDN_Test_05() {
    let str = '*.shop.example.com'
    let result
    let startTime = Date.now()
    for (let i = 0; i < BASE_COUNT; i++) {
        result = validator.isFQDN(str, {
            require_tld: false
          })
    }
    let endTime = Date.now()
    let time = endTime - startTime
    print("validator_isFQDN(str,require_tld): " + time + " ms")
    areEqual(false, result)

    // print(result)
}
/* Check if the string is a fully qualified domain name (for example, domain.com) */
function isFQDN_Test_06() {
    let str = '*.shop.example.com'
    let result
    let startTime = Date.now()
    for (let i = 0; i < BASE_COUNT; i++) {
        result = validator.isFQDN(str, {
            allow_trailing_dot: true, allow_underscores: true
          })
    }
    let endTime = Date.now()
    let time = endTime - startTime
    print("validator_isFQDN(str,allow_trailing_dot,allow_underscores): " + time + " ms")
    areEqual(false, result)

    // print(result)
}
/* Checks if the string contains any full Width characters */
function isFullWidth_Test() {    
    let str = '本demo是基于openHarmony系统下使用三方js库validator.js,validator.js是字符串验证器和清理器的库Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,  either express or implied.See the License for the specific language governing permissions and limitations under the License   Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at fofooofoooofoooo dfasd46354adf35sad4fasd64g5asdf1.ljひらがな・カタカナ、．漢字３ー０　ａ＠ｃｏｍＦｶﾀｶﾅﾞﾬGood＝Parts'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isFullWidth(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isFullWidth: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Checks if the string contains any half Width characters */
function isHalfWidth_Test() {    
    let str = '本demo是基于openHarmony系统下使用三方js库validator.js,validator.js是字符串验证器和清理器的库Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,  either express or implied.See the License for the specific language governing permissions and limitations under the License   Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at fofooofoooofoooo dfasd46354adf35sad4fasd64g5asdf1!"#$%&()<>/+=-_? ~^|.,@`{}[]l-btn_02--activeabc123いｶﾀｶﾅﾞﾬ￩'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isHalfWidth(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isHalfWidth: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Checks whether the string is a hash of the algorithm type */
function isHash_Test() {    
    let str = '2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isHash(str, 'sha256')
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isHash: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is a hexadecimal number */
function isHexadecimal_Test() {    
    let str = '0HfedCBA98765432100123456789abcDEFff0044deadBEEFfF00440123456789abcDEF0123456789abcDEFfedCBA9876543210'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isHexadecimal(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isHexadecimal: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check if the string is a hexadecimal color */
function isHexColor_Test() {    
    let str = '#ff0000ff'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isHexColor(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isHexColor: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check if the string is an HSL (hue, saturation, brightness, optional alpha) color based on the CSS Colors Level 4 specification */
function isHSL_Test() {    
    let str = 'hsl(+540.01e-98rad, 03%, 4%, 500)'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isHSL(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isHSL: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check if the string is IBAN (International Bank Account Number) */
function isIBAN_Test() {    
    let str = 'GR96 0810 0010 0000 0123 4567 890'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isIBAN(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isIBAN: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check that the string is a valid ID code */
function isIdentityCard_Test_01() {    
    let str = '722222222v'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isIdentityCard(str, 'any')
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isIdentityCard(str,any): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check that the string is a valid ID code */
function isIdentityCard_Test_02() {    
    let str = '722222222v'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isIdentityCard(str,'LK')
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isIdentityCard(str,LK): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is a valid IMEI number */
function isIMEI_Test() {    
    let str = '352099001761481'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isIMEI(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isIMEI: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Checks if the string is in the array of allowed values */
function isIn_Test() {    
    let str = ['foo', 'bar', 'foobarf', '34232', 'bar', 'bgfsdsdf', 'gfds', 'rtqwerq', '324234', '2324323', 'bafgdsfas', 'ngsfds', 'fs324', 'rgfs', '435sdfas', '4343', 'gsdf34', 'gsdfgs', 'myera', '34342111gsdf', 'nsadfasd', 'basdasf', '3sgdf', 'nrtwer', 'gd', 'bar', 'yter', '54', 'bar', 'fsdgf', '', 'mhgfd', 'fds', '', 'bar', 'afdsfsd', '43434', 'gsdfgsdf', 'hdgfd', 'gdfg', 'g34', 'fgsdf', 'fasd', '4343', 'fdasf', '', 'bar', 'fsdds', 'g34', 'gsdfgsdf', 'ngsfd', '', 'bar', 'foogsbar', '43434', 'bar', 'fdsfs', '', 'b112ar', 'foo211bar', '', 'bar', '43434', 'shw', 'bar', '534faeads', 'fase', 'ba333r', 'gs', '54rr', 'ba1212fr', 'a434', '', 'bar', 'f232oobar', '', 'bar', 'gsf', '4545', 'nsfds', '3434', '', 'bar', 'fooba3433r', '', 'bar', 'f434oobar', 'foobar']
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isIn('foobar', str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isIn: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check if the string is an integer */
function isInt_Test_01() {    
    let str = '+014352345436576458679764563545234513242362345236457687659879878635456432534452354523452345476575686785745672345624542345345245436587696780987956876476536345636534552364576876598798786354564325344523545234523454765756867857456723456245423453452454365876967809879568764765363456365345'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isInt(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isInt(str): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check if the string is an integer */
function isInt_Test_02() {    
    let str = '+014352345436576458679764563545234513242362345236457687659879878635456432534452354523452345476575686785745672345624542345345245436587696780987956876476536345636534552364576876598798786354564325344523545234523454765756867857456723456245423453452454365876967809879568764765363456365345'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isInt(str, {allow_leading_zeroes: true})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isInt(str,allow_leading_zeroes_true): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check if the string is an integer */
function isInt_Test_03() {    
    let str = '+014352345436576458679764563545234513242362345236457687659879878635456432534452354523452345476575686785745672345624542345345245436587696780987956876476536345636534552364576876598798786354564325344523545234523454765756867857456723456245423453452454365876967809879568764765363456365345'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isInt(str, {allow_leading_zeroes: false})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isInt(str,allow_leading_zeroes_false): " + time +" ms")  
    areEqual(false, result) 
   
    // print(result)
} 

/* Check if the string is an integer */
function isInt_Test_04() {    
    let str = '15'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isInt(str, {gt: 10,lt: 30})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isInt(str,gt,lt): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 
/* Check if the string is an integer */
function isInt_Test_05() {
    let str = '288'
    let result
    let startTime = Date.now()
    for (let i = 0; i < BASE_COUNT; i++) {
        result = validator.isInt(str, { min:109, max:350 })
    }
    let endTime = Date.now()
    let time = endTime - startTime
    print("validator_isInt(str,min,max): " + time + " ms")
    areEqual(true, result)

    // print(result)
}
/* Check if the string is IP (version 4 or 6) */
function isIP_Test() {    
    let str = '2001:db8:3:4::192.0.2.32'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isIP(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isIP: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check if the string is in the IP range (version 4 or 6) */
function isIPRange_Test() {    
    let str = '255.255.255.0/32'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isIPRange(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isIPRange: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is an ISBN */
function isISBN_Test() {    
    let str = '3836221195'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isISBN(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isISBN: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check if the string is ISIN (Stock/Security identifier) */
function isISIN_Test() {    
    let str = 'AU0000XVGZA3'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isISIN(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isISIN: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check that the string is a valid ISO 639-1 language code */
function isISO6391_Test() {    
    let str = 'ay'
    let result
    let startTime = Date.now()
    for (let i=0;i<LONG_COUNT;i++) {
        result = validator.isISO6391(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isISO6391: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check that the string is a valid ISO 8601 date */
function isISO8601_Test_01() {    
    let str = '2009-12T12:34'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isISO8601(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isISO8601: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check that the string is a valid ISO 8601 date */
function isISO8601_Test_02() {    
    let str = '2009-12T12:34'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isISO8601(str, {strict: true})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isISO8601(str,strict): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check that the string is a valid ISO 8601 date */
function isISO8601_Test_03() {    
    let str = '2009-12T12:34'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isISO8601(str, {strictSeparator: true})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isISO8601(str,strictSeparator): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check that the string is a valid ISO 3166-1 alpha-2 official country code */
function isISO31661Alpha2_Test() {    
    let str = 'FR'
    let result
    let startTime = Date.now()
    for (let i=0;i<LONG_COUNT;i++) {
        result = validator.isISO31661Alpha2(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isISO31661Alpha2: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check that the string is a valid ISO 3166-1 alpha-3 official country code */
function isISO31661Alpha3_Test() {    
    let str = 'RWA'
    let result
    let startTime = Date.now()
    for (let i=0;i<LONG_COUNT;i++) {
        result = validator.isISO31661Alpha3(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isISO31661Alpha3: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check that the string is a valid ISO 4217 official country code */
function isISO4217_Test() {    
    let str = 'EUR'
    let result
    let startTime = Date.now()
    for (let i=0;i<LONG_COUNT;i++) {
        result = validator.isISO4217(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isISO4217: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is ISRC */
function isISRC_Test() {    
    let str = 'GBAYE6800011'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isISRC(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isISRC: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check if the string is ISSN */
function isISSN_Test_01() {    
    let str = '2434-561x'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isISSN(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isISSN(str): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check if the string is ISSN */
function isISSN_Test_02() {    
    let str = '2434-561x'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isISSN(str, {case_sensitive: true})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isISSN(str,case_sensitive): " + time +" ms")  
    areEqual(false, result) 
   
    // print(result)
} 

/* Check if the string is ISSN */
function isISSN_Test_03() {    
    let str = '2434-561x'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isISSN(str, {require_hyphen: true})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isISSN(str,require_hyphen): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check that the string is valid JSON (note: json.parse is used) */
function isJSON_Test_01() {    
    let str = '{ "key": "value", "name":"Mrs.W", "age":25, "hobby":["basketball","football","singing"],"animal":{"name":"piggy","age":3,"color":"black"},"friends":[{"name":"Jim","age":23},{"name":"Krih","age":19},{"name":"Vigger","age":20}],"school":"XFU","work":"JAVA","food":["noodles","rice","bread","milk"]}'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isJSON(str, { allow_primitives: false })
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isJSON(allow_primitives_false): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

function isJSON_Test_02() {    
    let str = '{ "key": "value", "name":"Mrs.W", "age":25, "hobby":["basketball","football","singing"],"animal":{"name":"piggy","age":3,"color":"black"},"friends":[{"name":"Jim","age":23},{"name":"Krih","age":19},{"name":"Vigger","age":20}, "null","false","true"],"school":"XFU","work":"JAVA","food":["noodles","rice","bread","milk"]}'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isJSON(str, { allow_primitives: true })
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isJSON(allow_primitives_true): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is a valid JWT token */
function isJWT_Test() {    
    let str = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqb2huIjp7ImFnZSI6MjUsImhlaWdodCI6MTg1fSwiamFrZSI6eyJhZ2UiOjMwLCJoZWlnaHQiOjI3MH19.YRLPARDmhGMC3BBk_OhtwwK21PIkVCqQe8ncIRPKo-E'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isJWT(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isJWT: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is a valid latitude and longitude coordinate of the format lat,long or lat,long */
function isLatLong_Test_01() {    
    let str = '(-12.3456789, +12.3456789)'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isLatLong(str, { checkDMS: false })
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isLatLong(checkDMS_false): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is a valid latitude and longitude coordinate of the format lat,long or lat,long */
function isLatLong_Test_02() {    
    let str = '40° 26′ 46″ N, 79° 58′ 56″ W'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isLatLong(str, { checkDMS: true })
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isLatLong(checkDMS_true): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Checks whether the length of the string is within a certain range */
function isLength_Test() {    
    let str = 'Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,  either express or implied.See the License for the specific language governing permissions and limitations under the License   Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at here.'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isLength(str,1,725) 
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isLength: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check if the string matches the license plate format of a certain country */
function isLicensePlate_Test_01() {    
    let str = 'ALA4011'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isLicensePlate(str, 'cs-CZ')
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isLicensePlate(cs-CZ): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check if the string matches the license plate format of a certain country */
function isLicensePlate_Test_02() {    
    let str = 'FS AB 123'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isLicensePlate(str, 'any')
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isLicensePlate(any): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is locale */
function isLocale_Test() {    
    let str = 'ca_ES_VALENCIA'
    let result
    let startTime = Date.now()
    for (let i=0;i<LONG_COUNT;i++) {
        result = validator.isLocale(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isLocale: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check if the string is lowercase */
function isLowercase_Test() {    
    let str = 'which allows for rapid development cycles and easy deployment. the language flexibility and lightweight nature have made it ideal for the fast-paced, iterative development processes favored by these methodologies.javascript has also been at the forefront of open-source initiatives, with a vast array of libraries and frameworks developed and maintained by the community. these projects, such as react, angular, and vue.js, have standardized many web development tasks, providing reusable code and components that can be shared across different projects.the influence of javascript extends beyond traditional web development. it has become a key player in the world of cloud computing, where platforms like node.js are used to build serverless architectures that scale dynamically based on demand. this has revolutionized the way businesses think about infrastructure, allowing them to focus on application development rather than hardware management.'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isLowercase(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isLowercase: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string passes the Luhn algorithm check */
function isLuhnNumber_Test() {    
    let str = '4716-2210-5188-5662'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isLuhnNumber(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isLuhnNumber: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is a MAC address */
function isMACAddress_Test_01() {    
    let str = '01:AB:03:04:05:06:07:08'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isMACAddress(str, {no_separators: false})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isMACAddress(no_separators_false): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is a MAC address */
function isMACAddress_Test_02() {    
    let str = '01AB030405060708'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isMACAddress(str, {no_separators: true})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isMACAddress(no_separators_true): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is a MAC address */
function isMACAddress_Test_03() {    
    let str = '01:02:03:04:05:ab'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isMACAddress(str, {eui: '48'})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isMACAddress(eui_48): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
}

/* Check whether the string is a MAC address */
function isMACAddress_Test_04() {    
    let str = '01:02:03:04:05:06:07:ab'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isMACAddress(str, {eui: '64'})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isMACAddress(eui_64): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is in the Magnet URI format */
function isMagnetURI_Test() {    
    let str = 'magnet:?xt=urn:btih:ABCDEFGHIJKLMNOPQRSTUVWXYZ12345678901234&dn=helloword2000&tr=udp://helloworld:1337/announce'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isMagnetURI(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isMagnetURI: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is MD5 hash */
function isMD5_Test() {    
    let str = 'd94f3f016ae679c3008de268209132f2'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isMD5(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isMD5: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Checks that the string matches a valid MIME type format */
function isMimeType_Test() {    
    let str = 'multipart/form-data; boundary=something; charset=utf-8'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isMimeType(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isMimeType: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check if the string is a mobile phone number */
function isMobilePhone_Test_01() {    
    let str = '19876543210'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isMobilePhone(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isMobilePhone(str): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check if the string is a mobile phone number */
function isMobilePhone_Test_02() {    
    let str = '+254728530234'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isMobilePhone(str, 'any', {strictMode: true})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isMobilePhone(str,any,strictMode): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check if the string is a mobile phone number */
function isMobilePhone_Test_03() {    
    let str = '+254728530234'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isMobilePhone(str, ['am-Am', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-EH', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-PS', 'ar-SA'], {strictMode: true})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isMobilePhone(str,array,strictMode): " + time +" ms")  
    areEqual(false, result) 
   
    // print(result)
} 

/* Check whether the string is a valid hexadecimal encoded representation of MongoDB ObjectId */
function isMongoId_Test() {    
    let str = '507f1f77bcf86cd799439011'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isMongoId(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isMongoId: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Checks whether the string contains one or more multi-byte characters */
function isMultibyte_Test() {    
    let str = 'ひらがな・カタカナ、．漢字あいうえお foobartest＠example.com1234abcDEｘｙｚｶﾀｶﾅ中文gfdthis is lowercase.4234321 Another area where JavaScript is making waves is in the realm of blockchain technology. With the rise of decentralized applications (DApps), JavaScript is being used to write smart contracts and develop interfaces for interacting with blockchain networks. This opens up new possibilities for secure, peer-to-peer systems that can be used for anything from financial transactions to supply chain management.As we look to the future, JavaScript is poised to remain a critical component of the tech ecosystem. Efforts are underway to improve the language even further, with ECMAScript continuing to evolve and introduce new features. Promising advancements like WebAssembly may eventually allow JavaScript to be used for even more system-level tasks'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isMultibyte(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isMultibyte: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check if the string contains only numbers */
function isNumeric_Test_01() {    
    let str = '1230012300123001235632542345234523452345234513121345369908755654241645447890974463465123.654363456456345645634512303241341324123624351234123412412314325437654687804562431513414314324123412342341234132412376546878045624315134143143241234123423412341324123765468780456243151341431432412341234234123413241200000'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isNumeric(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isNumeric(str): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check if the string contains only numbers */
function isNumeric_Test_02() {    
    let str = '1230012300123001235632542345234523452345234513121345369908755654241645447890974463465123.654363456456345645634512303241341324123624351234123412412314325437654687804562431513414314324123412342341234132412376546878045624315134143143241234123423412341324123765468780456243151341431432412341234234123413241200000'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isNumeric(str, { no_symbols: false })
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isNumeric(str,no_symbols): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Checks if the string is a valid octal number */
function isOctal_Test() {    
    let str = '0o0123456707654321012300123654327555454366724524314324123413243254235435234707654321012300123654327555454366724524314324123413243254235435234707654321012300123654327555454366724524314324123413243254235435234707654321012300123654327555454366724524314324123413243254235435234707654321012300123654327555454366724524314324123413243254235435234707654321012300123654327555454366724524314324123413243254235435234707654321012300123654327555454366724524314324123413243254235435234707654321012300123654327555454366724524314324123413243254235435234707654321012300123654327555454366724524314324123413243254235435234'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isOctal(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isOctal: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check if the string is a valid passport number */
function isPassportNumber_Test() {    
    let str = 'S1100409'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isPassportNumber(str,'CH')
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isPassportNumber: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is a valid port number */
function isPort_Test() {    
    let str = '65535'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isPort(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isPort: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is a zip code */
function isPostalCode_Test() {    
    let str = '060623'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isPostalCode(str,'any')
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isPostalCode: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check that the string is a valid RFC 3339 date */
function isRFC3339_Test() {    
    let str = '2010-02-18t16:12:23.23334444z'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isRFC3339(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isRFC3339: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is an rgb color or an rgba color */
function isRgbColor_Test_01() {    
    let str =  'rgba(255,255,255,.1)'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isRgbColor(str, [false])
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isRgbColor(includePercentValues_false): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is an rgb color or an rgba color */
function isRgbColor_Test_02() {    
    let str =  'rgba(5%,5%,5%,.3)'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isRgbColor(str, [true])
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isRgbColor(includePercentValues_true): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is a semantic versioning specification */
function isSemVer_Test() {    
    let str = '1.0.0-alpha-a.b-c-somethinglong+build.1-aef.1-its-okay'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isSemVer(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isSemVer: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Checks if the string contains any proxy pair characters */
function isSurrogatePair_Test() {    
    let str = '𠮷野𠮷𩸽ABC千𥧄1-2-3 further expanding its reach.In conclusion, JavaScript journey from a simple scripting language to a versatile and powerful platform for all kinds of software development is a testament to its adaptability and the ingenuity of the community that surrounds it. Its impact on modern web development cannot be overstated, and as technology continues to advance, JavaScript is sure to play a pivotal role in shaping the future of software engineering.JavaScript journey has been one of constant evolution, shaped by the demands of an ever-changing web landscape. Its earliest iterations were limited in functionality, with the initial release lacking many of the features that are now synonymous with the language. Over time, as the World Wide Web grew in complexity and user expectations rose'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isSurrogatePair(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isSurrogatePair: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check if the string is capitalized */
function isUppercase_Test() {    
    let str = 'FURTHER EXPANDING ITS REACH.IN CONCLUSION, JAVASCRIPT JOURNEY FROM A SIMPLE SCRIPTING LANGUAGE TO A VERSATILE AND POWERFUL PLATFORM FOR ALL KINDS OF SOFTWARE DEVELOPMENT IS A TESTAMENT TO ITS ADAPTABILITY AND THE INGENUITY OF THE COMMUNITY THAT SURROUNDS IT. ITS IMPACT ON MODERN WEB DEVELOPMENT CANNOT BE OVERSTATED, AND AS TECHNOLOGY CONTINUES TO ADVANCE, JAVASCRIPT IS SURE TO PLAY A PIVOTAL ROLE IN SHAPING THE FUTURE OF SOFTWARE ENGINEERING.JAVASCRIPT JOURNEY HAS BEEN ONE OF CONSTANT EVOLUTION, SHAPED BY THE DEMANDS OF AN EVER-CHANGING WEB LANDSCAPE. ITS EARLIEST ITERATIONS WERE LIMITED IN FUNCTIONALITY, WITH THE INITIAL RELEASE LACKING MANY OF THE FEATURES THAT ARE NOW SYNONYMOUS WITH THE LANGUAGE. OVER TIME, AS THE WORLD WIDE WEB GREW IN COMPLEXITY AND USER EXPECTATIONS ROSE'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isUppercase(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isUppercase: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is of slug type */
function isSlug_Test() {    
    let str = 'foofoo-barfoo_barfoo-bar-foofoo-bar_foofoo-bar_foo*75-b4r-**_foofoo-bar_foo*75-b4r-**_foo-&&'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isSlug(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isSlug: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string can be considered a strong password */
function isStrongPassword_Test_01() {    
    let str = '%2%k CDetV*p%Nr6w&H%FeF£3.ndSau_7'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isStrongPassword(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isStrongPassword(str): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string can be considered a strong password */
function isStrongPassword_Test_02() {    
    let str = '%2%k CDetV*p%Nr6w&H%FeF£3.ndSau_7'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isStrongPassword(str, {returnScore: true})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isStrongPassword(str,returnScore): " + time +" ms")  
    areEqual(70.5, result) 
   
    // print(result)
} 

/* Check whether the string is valid for time, for example [23:01:59, new Date().tolocaletimeString ()]. */
function isTime_Test_01() {    
    let str = '7:00:00 AM'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isTime(str,{ hourFormat: 'hour12', mode: 'withSeconds' })
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isTime(hourFormat_hour12,mode_withSeconds): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is valid for time, for example [23:01:59, new Date().tolocaletimeString ()]. */
function isTime_Test_02() {    
    let str = '23:59:59'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isTime(str,{ hourFormat: 'hour24', mode: 'withSeconds' })
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isTime(hourFormat_hour24,mode_withSeconds): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
}

/* Check whether the string is valid for time, for example [23:01:59, new Date().tolocaletimeString ()]. */
function isTime_Test_03() {    
    let str = '23:59'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isTime(str,{ hourFormat: 'hour24', mode: 'default' })
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isTime(hourFormat_hour24,mode_default): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
}

/* Check whether the string is valid for time, for example [23:01:59, new Date().tolocaletimeString ()]. */
function isTime_Test_04() {    
    let str = '7:00 AM'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isTime(str,{ hourFormat: 'hour12', mode: 'default' })
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isTime(hourFormat_hour12,mode_default): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
}

/* Check that the string is a valid tax identification number */
function isTaxID_Test() {    
    let str = '93--173/6581'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isTaxID(str,'de-AT')
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isTaxID: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is a URL */
function isURL_Test_01() {    
    let str = 'http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isURL(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isURL(str): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is a URL */
function isURL_Test_02() {    
    let str = 'http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isURL(str, {require_protocol:true})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isURL(str,require_protocol): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is a URL */
function isURL_Test_03() {    
    let str = 'http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isURL(str, {require_valid_protocol:true})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isURL(str,require_valid_protocol): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is a URL */
function isURL_Test_04() {    
    let str = 'rtmp://foobar.com'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isURL(str, {protocols:['rtmp']})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isURL(str,protocols): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is a URL */
function isURL_Test_05() {    
    let str = 'http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isURL(str, {require_host:false})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isURL(str,require_host): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is a URL */
function isURL_Test_06() {    
    let str = 'http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isURL(str, {require_port:true})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isURL(str,require_port): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is a URL */
function isURL_Test_07() {    
    let str = 'http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isURL(str, {allow_protocol_relative_urls:true})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isURL(str,allow_protocol_relative_urls): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check whether the string is a URL */
function isURL_Test_08() {    
    let str = 'http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isURL(str, {allow_fragments:false})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isURL(str,allow_fragments): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
}

/* Check whether the string is a URL */
function isURL_Test_09() {    
    let str = 'http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isURL(str, {allow_query_components:false})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isURL(str,allow_query_components): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
}

/* Check whether the string is a URL */
function isURL_Test_10() {    
    let str = `http://foobar.com/${new Array(2083).join('f')}`
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isURL(str, {validate_length:false})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isURL(str,validate_length): " + time +" ms") 
    areEqual(true, result) 
   
    // print(result)
}

/* Check if the string is UUID  */
function isUUID_Test() {    
    let str = 'A987FBC9-4BED-3078-CF07-9141BA07C9F3'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isUUID(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isUUID: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Checks whether the string contains a mixture of full - and half-corner characters */
function isVariableWidth_Test() {    
    let str = 'FURTHER EXPANDING ITS REACH.IN CONCLUSION, JAVASCRIPT JOURNEY FROM A SIMPLE SCRIPTING LANGUAGE TO A VERSATILE AND POWERFUL PLATFORM FOR ALL KINDS OF SOFTWARE DEVELOPMENT IS A TESTAMENT TO ITS ADAPTABILITY AND THE INGENUITY OF THE COMMUNITY THAT SURROUNDS IT. ITS IMPACT ON MODERN WEB DEVELOPMENT CANNOT BE OVERSTATED, AND AS TECHNOLOGY CONTINUES TO ADVANCE, JAVASCRIPT IS SURE TO PLAY A PIVOTAL ROLE IN SHAPING THE FUTURE OF SOFTWARE ENGINEERING.JAVASCRIPT JOURNEY HAS BEEN ONE OF CONSTANT EVOLUTION, SHAPED BY THE DEMANDS OF AN EVER-CHANGING WEB LANDSCAPE. ITS EARLIEST ITERATIONS WERE LIMITED IN FUNCTIONALITY, WITH THE INITIAL RELEASE LACKING MANY OF THE FEATURES THAT ARE NOW SYNONYMOUS WITH THE LANGUAGE. OVER TIME, AS THE WORLD WIDE WEB GREW IN COMPLEXITY AND USER EXPECTATIONS ROSE;SLDK[0ASDOJGA DOSKF[-03RPOWAEJFPASDJFPSDAOIFJKASDひらがなカタカナ漢字ABCDE３ー０123ＦｶﾀｶﾅﾞﾬGood＝Parts'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isVariableWidth(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isVariableWidth: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* If it is possible to verify a given country code that matches ISO 3166-1 alpha-2, check that the string is a valid VAT number */
function isVAT_Test() {    
    let str = 'CH123.456.789TVA'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isVAT(str, 'CH')
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isVAT: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Checks whether the string consists only of characters that appear in whitelist chars */
function isWhitelisted_Test() {    
    let str = 'which allows for rapid development cycles and easy deployment. the language flexibility and lightweight nature have made it ideal for the fast-paced, iterative development processes favored by these methodologies.javascript has also been at the forefront of open-source initiatives, with a vast array of libraries and frameworks developed and maintained by the community. these projects, such as react, angular, and vue.js, have standardized many web development tasks, providing reusable code and components that can be shared across different projects.the influence of javascript extends beyond traditional web development. it has become a key player in the world of cloud computing, where platforms like node.js are used to build serverless architectures that scale dynamically based on demand. this has revolutionized the way businesses think about infrastructure, allowing them to focus on application development rather than hardware management------------------------- -vz--vcngmuertr-ty--i-i-ytt-g-a-dsf-a-fwa'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.isWhitelisted(str, ' ,.abcdefghijklmnopqrstuvwxyz-')
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_isWhitelisted: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Check that the string matches the pattern */
function matches_Test() {    
    let str = 'which allows for rapid development cycles and easy deployment. the language flexibility and lightweight nature have made it ideal for the fast-paced, iterative development processes favored by these methodologies.javascript has also been at the forefront of open-source initiatives, with a vast array of libraries and frameworks developed and maintained by the community. these projects, such as react, angular, and vue.js, have standardized many web development tasks, providing reusable code and components that can be shared across different projects.the influence of javascript extends beyond traditional web development. it has become a key player in the world of cloud computing, where platforms like node.js are used to build serverless architectures that scale dynamically based on demand. this has revolutionized the way businesses think about abc infrastructure, allowing them to focus on application development rather than hardware management'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.matches(str, new RegExp('abc'))
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_matches: " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Delete the characters in the blacklist */
function blacklist_Test() {    
    let str = 'which allows for rapid development cycles and easy deployment. the language flexibility and lightweight nature have made it ideal for the fast-paced, iterative development processes favored by these methodologies.javascript has also been at the forefront of open-source initiatives, with a vast array of libraries and frameworks developed and maintained by the community. these projects, such as react, angular, and vue.js, have standardized many web development tasks, providing reusable code and components that can be shared across different projects.the influence of javascript extends beyond traditional web development. it has become a key player in the world of cloud computing, where platforms like node.js are used to build serverless architectures that scale dynamically based on demand. this has revolutionized the way businesses think about abc infrastructure, allowing them to focus on application development rather than hardware management'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.blacklist(str, 'abc')
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_blacklist: " + time +" ms")  
    areEqual('whih llows for rpid development yles nd esy deployment. the lnguge flexiility nd lightweight nture hve mde it idel for the fst-ped, itertive development proesses fvored y these methodologies.jvsript hs lso een t the forefront of open-soure inititives, with  vst rry of lirries nd frmeworks developed nd mintined y the ommunity. these projets, suh s ret, ngulr, nd vue.js, hve stndrdized mny we development tsks, providing reusle ode nd omponents tht n e shred ross different projets.the influene of jvsript extends eyond trditionl we development. it hs eome  key plyer in the world of loud omputing, where pltforms like node.js re used to uild serverless rhitetures tht sle dynmilly sed on demnd. this hs revolutionized the wy usinesses think out  infrstruture, llowing them to fous on pplition development rther thn hrdwre mngement', result) 
   
    // print(result)
} 

/* Replace <, >, &, ', " and / with HTML  */
function escape_Test() {    
    let str = "<script> alert('xss&fun'); Backtick: ` Backslash: \\</script>"
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.escape(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_escape: " + time +" ms")  
    areEqual('&lt;script&gt; alert(&#x27;xss&amp;fun&#x27;); Backtick: &#96; Backslash: &#x5C;&lt;&#x2F;script&gt;', result) 
   
    // print(result)
} 


/* Trim the characters from the left side of the input */
function ltrim_Test() {    
    let str = '  \r\n\tfoo  \r\n\t   The rise of HTML5 and CSS3 brought with it new APIs and capabilities that allowed developers to create applications that were not only functional but also optimized for performance and user experience on mobile devices.In recent years, the development community has seen a shift towards modern software development practices such as Agile and DevOps. JavaScript has played a central role in enabling these practices through tools like Node.js, which allows for rapid development cycles and easy deployment'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.ltrim(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_ltrim: " + time +" ms")  
    areEqual('foo  \r\n\t   The rise of HTML5 and CSS3 brought with it new APIs and capabilities that allowed developers to create applications that were not only functional but also optimized for performance and user experience on mobile devices.In recent years, the development community has seen a shift towards modern software development practices such as Agile and DevOps. JavaScript has played a central role in enabling these practices through tools like Node.js, which allows for rapid development cycles and easy deployment', result) 
   
    // print(result)
} 

/* Normalize email addresses */
function normalizeEmail_Test_01() {    
    let str = 'some.name.midd..leNa...me...+extension@GoogleMail.com'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.normalizeEmail(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_normalizeEmail(str): " + time +" ms")  
    areEqual('somenamemidd..lena...me...@gmail.com', result) 
   
    // print(result)
} 

/* Normalize email addresses */
function normalizeEmail_Test_02() {    
    let str = 'SOME.name.midd.leNa.me.+extension@gmail.com'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.normalizeEmail(str, {all_lowercase: false})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_normalizeEmail(str,all_lowercase): " + time +" ms")  
    areEqual('somenamemiddlename@gmail.com', result) 
   
    // print(result)
} 

/* Normalize email addresses */
function normalizeEmail_Test_03() {    
    let str = 'SOME.name.midd.leNa.me.+extension@gmail.com'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.normalizeEmail(str, {gmail_lowercase: false})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_normalizeEmail(str,gmail_lowercase): " + time +" ms")  
    areEqual('somenamemiddlename@gmail.com', result) 
   
    // print(result)
} 

/* Normalize email addresses */
function normalizeEmail_Test_04() {    
    let str = 'SOME.name.midd.leNa.me.+extension@gmail.com'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.normalizeEmail(str, {gmail_remove_dots: false})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_normalizeEmail(str,gmail_remove_dots): " + time +" ms")  
    areEqual('some.name.midd.lena.me.@gmail.com', result) 
   
    // print(result)
} 

/* Normalize email addresses */
function normalizeEmail_Test_05() {    
    let str = 'SOME.name.midd.leNa.me.+extension@gmail.com'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.normalizeEmail(str, {gmail_remove_subaddress: false})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_normalizeEmail(str,gmail_remove_subaddress): " + time +" ms")  
    areEqual('somenamemiddlename+extension@gmail.com', result) 
   
    // print(result)
} 

/* Normalize email addresses */
function normalizeEmail_Test_06() {    
    let str = 'ME@outlook.COM'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.normalizeEmail(str, {outlookdotcom_lowercase: false})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_normalizeEmail(str,outlookdotcom_lowercase): " + time +" ms")  
    areEqual('me@outlook.com', result) 
   
    // print(result)
} 

/* Normalize email addresses */
function normalizeEmail_Test_07() {    
    let str = 'foo+bar@live.fr'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.normalizeEmail(str, {outlookdotcom_remove_subaddress: false})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_normalizeEmail(str,outlookdotcom_remove_subaddress): " + time +" ms")  
    areEqual('foo+bar@live.fr', result) 
   
    // print(result)
} 

/* Normalize email addresses */
function normalizeEmail_Test_08() {    
    let str = 'ME@ymail.COM'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.normalizeEmail(str, {yahoo_lowercase: false})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_normalizeEmail(str,yahoo_lowercase): " + time +" ms")  
    areEqual('me@ymail.com', result) 
   
    // print(result)
} 

/* Normalize email addresses */
function normalizeEmail_Test_09() {    
    let str = 'some.name.midd..leNa...me...+extension@GoogleMail.com'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.normalizeEmail(str, {yahoo_remove_subaddress: false})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_normalizeEmail(str,yahoo_remove_subaddress): " + time +" ms")  
    areEqual('somenamemidd..lena...me...@gmail.com', result) 
   
    // print(result)
}

/* Normalize email addresses */
function normalizeEmail_Test_10() {    
    let str = 'ME@icloud.COM'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.normalizeEmail(str, {icloud_lowercase: false})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_normalizeEmail(str,icloud_lowercase): " + time +" ms")  
    areEqual('me@icloud.com', result) 
   
    // print(result)
}

/* Normalize email addresses */
function normalizeEmail_Test_11() {    
    let str = 'ME@icloud.COM'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.normalizeEmail(str, {icloud_remove_subaddress: false})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_normalizeEmail(str,icloud_remove_subaddress): " + time +" ms")  
    areEqual('me@icloud.com', result) 
   
    // print(result)
}

/* Trim characters from the right side of the input */
function rtrim_Test() {    
    let str = 'The rise of HTML5 and CSS3 brought with it new APIs and capabilities that allowed developers to create applications that were not only functional but also optimized for performance and user experience on mobile devices.In recent years, the development community has seen a shift towards modern software development practices such as Agile and DevOps. JavaScript has played a central role in enabling these practices through tools like Node.js, which allows for rapid development cycles and easy deployment. The language flexibility and lightweight nature have made it ideal for the fast-paced, iterative development processes favored by these methodologies.JavaScript has also been at the forefront of open-source initiatives, with a vast array of libraries and frameworks developed and maintained by the community. These projects, such as React, Angular, and Vue.js, have standardized many web development tasks, providing reusable code and components that can be shared across different projects.The influence of JavaScript extends beyond traditional web development.  \r\n\tfoo  \r\n\t   '
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.rtrim(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_rtrim: " + time +" ms")  
    areEqual('The rise of HTML5 and CSS3 brought with it new APIs and capabilities that allowed developers to create applications that were not only functional but also optimized for performance and user experience on mobile devices.In recent years, the development community has seen a shift towards modern software development practices such as Agile and DevOps. JavaScript has played a central role in enabling these practices through tools like Node.js, which allows for rapid development cycles and easy deployment. The language flexibility and lightweight nature have made it ideal for the fast-paced, iterative development processes favored by these methodologies.JavaScript has also been at the forefront of open-source initiatives, with a vast array of libraries and frameworks developed and maintained by the community. These projects, such as React, Angular, and Vue.js, have standardized many web development tasks, providing reusable code and components that can be shared across different projects.The influence of JavaScript extends beyond traditional web development.  \r\n\tfoo', result) 
   
    // print(result)
} 

/* Delete characters whose values are < 32 and 127, mainly control characters */
function stripLow_Test() {    
    let str = 'JavaScript is making waves is in the realm of blockchain technology. With the rise of decentralized applications (DApps), JavaScript is being used to write smart contracts and develop interfaces for interacting with blockchain networks. This opens up new possibilities for secure, peer-to-peer systems that can be used for anything from financial transactions to supply chain management.\x7Ffoo\x02'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.stripLow(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_stripLow: " + time +" ms")  
    areEqual('JavaScript is making waves is in the realm of blockchain technology. With the rise of decentralized applications (DApps), JavaScript is being used to write smart contracts and develop interfaces for interacting with blockchain networks. This opens up new possibilities for secure, peer-to-peer systems that can be used for anything from financial transactions to supply chain management.foo', result) 
   
    // print(result)
}  

/* Converts the input string to a Boolean value */
function toBoolean_Test_01() {    
    let str = 'This laid the groundwork for modern web applications that are rich in interactivity and responsiveness.As mobile devices became more prevalent, JavaScript had to adapt to smaller screens and touch interfaces. The rise of HTML5 and CSS3 brought with it new APIs and capabilities that allowed developers to create applications that were not only functional but also optimized for performance and user experience on mobile devices.In recent years, the development community has seen a shift towards modern software development practices such as Agile and DevOps'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.toBoolean(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_toBoolean(str): " + time +" ms")  
    areEqual(true, result) 
   
    // print(result)
} 

/* Converts the input string to a Boolean value */
function toBoolean_Test_02() {    
    let str = 'This laid the groundwork for modern web applications that are rich in interactivity and responsiveness.As mobile devices became more prevalent, JavaScript had to adapt to smaller screens and touch interfaces. The rise of HTML5 and CSS3 brought with it new APIs and capabilities that allowed developers to create applications that were not only functional but also optimized for performance and user experience on mobile devices.In recent years, the development community has seen a shift towards modern software development practices such as Agile and DevOps'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.toBoolean(str, {strict: true})
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_toBoolean(str,strict): " + time +" ms")  
    areEqual(false, result) 
   
    // print(result)
} 

/* Converts the input string to a date, or null if the input is not a date */
function toDate_Test() {    
    let str = '2007-05-19 14:34:23'
    let result 
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.toDate(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_toDate: " + time +" ms")  
    let expected = 'Sat May 19 2007 14:34:23 GMT+0800'
    if (!result.toString().includes(expected)){
        let error = 
        '  Failed areEqual test' +
        '  Expected: ' + expected +
        '  Actual:   ' + result.toString()
        ;
        throw(error) 
    } 
   
    // print(result)
} 

/* Converts the input string to floating point, or NaN if the input is not */
function toFloat_Test() {    
    let str = '-52431324132.52345898003'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.toFloat(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_toFloat: " + time +" ms")  
    areEqual(-52431324132.52346, result) 
   
    // print(result)
} 

/* Converts the input string to an integer, or NaN if the input is not an integer */
function toInt_Test() {    
    let str = '625252.7456126568995654115346145676518567665594654045632131231562134455446564854668985965556415531546554648524399874874979824514535584897816535265492859445415656458659761856517654617654656568'
    let result
    let startTime = Date.now()
    for (let i=0;i<LONG_COUNT;i++) {
        result = validator.toInt(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_toInt: " + time +" ms")  
    areEqual(625252, result) 
   
    // print(result)
} 

/* Trim the characters on both sides of the input (default is blank) */
function trim_Test() {    
    let str = '  \r\n\t Angular, and Vue.js, have standardized many web development tasks, providing reusable code and components that can be shared across different projects.The influence of JavaScript extends beyond traditional web development. It has become a key player in the world of cloud computing, where platforms like Node.foo  \r\n\t   '
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.trim(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_trim: " + time +" ms")  
    areEqual('Angular, and Vue.js, have standardized many web development tasks, providing reusable code and components that can be shared across different projects.The influence of JavaScript extends beyond traditional web development. It has become a key player in the world of cloud computing, where platforms like Node.foo', result) 
   
    // print(result)
} 

/* Replace HTML-encoded entities with <, >, &, ', "and / */
function unescape_Test() {    
    let str = '&lt;script&gt; alert(&quot;xss&amp;fun&quot;); &lt;&#x2F;script&gt;&lt;script&gt; alert(xss&amp;fun); &lt;&#x2F;script&gt;Backtick: &#96;Escaped string: &amp;lt;'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.unescape(str)
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_unescape: " + time +" ms")  
    areEqual('<script> alert("xss&fun"); </script><script> alert(xss&fun); </script>Backtick: `Escaped string: &lt;', result) 
   
    // print(result)
} 

/* Delete characters that do not appear in the whitelist */
function whitelist_Test() {    
    let str = ' This opens up new possibilities for secure, peer-to-peer systems that can be used for anything from financial transactions to supply chain management.As we look to the future, JavaScript is poised to remain a critical component of the tech ecosystem. Efforts are underway to improve the language even further, with ECMAScript continuing to evolve and introduce new features. Promising advancements like WebAssembly may eventually allow JavaScript to be used for even more system-level tasks, further expanding its reach.In conclusion, JavaScript journey from a simple scripting language to a versatile and powerful platform for all kinds of software development is a testament to its adaptability and the ingenuity of the community that surrounds it. Its impact on modern web development cannot be overstated, and as technology continues to advance, JavaScript is sure to play a pivotal role in shaping the future of software engineering.JavaScript journey has been one of constant evolution, shaped by the demands of an ever-changing web landscape.white'
    let result
    let startTime = Date.now()
    for (let i=0;i<BASE_COUNT;i++) {
        result = validator.whitelist(str,'white')
    } 
    let endTime = Date.now() 
    let time = endTime - startTime
    print("validator_whitelist: " + time +" ms")  
    areEqual('hieewiiitieeeeeteetethteethiiittithieetwettheteitiieteiitiettheteheteteewtietheeeethewithittiiteeiteeweteiieetieeeeetwitteeeeeteeettheeiitehiiteieitietetiewetitweeeetitetettittiittheieittheitthtittiteweeeetteettetehtieteitietiteihithetetweeieeiiteheeettetihetheeeehiweewhite', result) 
   
    // print(result)
} 
 
/* Expected results and actual results verification  */
function areEqual(expected, actual) {
    // If expected and actual are both NaN, consider them equal.
    if (expected === actual || expected !== expected && actual !== actual) {
        // print('Success')
    } else {
        let error = 
        '  Failed areEqual test' +
        '  Expected: ' + expected +
        '  Actual:   ' + actual
        ;
        throw(error) 
    }
}

// function print(s){
//     console.log(s)
// }

/*  Benchmark  */
function validatorRun() { 
    contains_Test_01()
    contains_Test_02()  
    contains_Test_03()
    contains_Test_04()
    equals_Test()
    isAfter_Test_01() 
    isAfter_Test_02()
    isAfter_Test_03()
    isAfter_Test_04()
    isAfter_Test_05()
    isAlpha_Test_01()
    isAlpha_Test_02()
    isAlpha_Test_03()
    isAlphanumeric_Test_01()
    isAlphanumeric_Test_02()
    isAlphanumeric_Test_03()
    isAscii_Test()
    isAscii_Test_02()
    isBase32_Test_01()
    isBase32_Test_02()
    isBase32_Test_03()
    isBase58_Test()
    isBase58_Test_02()
    isBase64_Test_01()
    isBase64_Test_02()
    isBefore_Test()
    isBefore_Test_02()
    isBIC_Test()
    isBoolean_Test_01()
    isBoolean_Test_02()
    isBoolean_Test_03()
    isBtcAddress_Test()
    isByteLength_Test_01()
    isByteLength_Test_02()
    isByteLength_Test_03()
    isByteLength_Test_04()
    isCreditCard_Test_01()
    isCreditCard_Test_02()
    isCurrency_Test_01()
    isCurrency_Test_02()
    isCurrency_Test_03()
    isCurrency_Test_04()
    isCurrency_Test_05()
    isCurrency_Test_06()
    isCurrency_Test_07()
    isCurrency_Test_08()
    isCurrency_Test_09()
    isCurrency_Test_10()
    isDataURI_Test()
    isDate_Test_01()
    isDate_Test_02()
    isDate_Test_03()
    isDate_Test_04()
    isDate_Test_05()
    isDate_Test_06()
    isDate_Test_07()
    isDecimal_Test_01()
    isDecimal_Test_02()
    isDecimal_Test_03()
    isDecimal_Test_04()
    isDivisibleBy_Test()
    isEAN_Test()
    isEmail_Test_01()
    isEmail_Test_02()
    isEmail_Test_03()
    isEmail_Test_04()
    isEmail_Test_05()
    isEmail_Test_06()
    isEmail_Test_07()
    isEmail_Test_08()
    isEmpty_Test_01()
    isEmpty_Test_02()
    isEthereumAddress_Test()
    isFloat_Test_01()
    isFloat_Test_02()
    isFloat_Test_03()
    isFloat_Test_04()
    isFQDN_Test_01()
    isFQDN_Test_02()
    isFQDN_Test_03()
    isFQDN_Test_04()
    isFQDN_Test_05()
    isFQDN_Test_06()
    isFullWidth_Test()
    isHalfWidth_Test()
    isHash_Test()
    isHexadecimal_Test()
    isHexColor_Test()
    isHSL_Test()
    isIBAN_Test()
    isIdentityCard_Test_01()
    isIdentityCard_Test_02()
    isIMEI_Test()
    isIn_Test()
    isInt_Test_01()
    isInt_Test_02()
    isInt_Test_03()
    isInt_Test_04()
    isInt_Test_05()
    isIP_Test()
    isIPRange_Test()
    isISBN_Test()
    isISIN_Test()
    isISO6391_Test()
    isISO8601_Test_01()
    isISO8601_Test_02()
    isISO8601_Test_03()
    isISO31661Alpha2_Test()
    isISO31661Alpha3_Test()
    isISO4217_Test()
    isISRC_Test()
    isISSN_Test_01()
    isISSN_Test_02()
    isISSN_Test_03()
    isJSON_Test_01()
    isJSON_Test_02()
    isJWT_Test()
    isLatLong_Test_01()
    isLatLong_Test_02()
    isLength_Test()
    isLicensePlate_Test_01()
    isLicensePlate_Test_02()
    isLocale_Test()
    isLowercase_Test()
    isLuhnNumber_Test()
    isMACAddress_Test_01()
    isMACAddress_Test_02()
    isMACAddress_Test_03()
    isMACAddress_Test_04()
    isMagnetURI_Test()
    isMD5_Test()
    isMimeType_Test()
    isMobilePhone_Test_01()
    isMobilePhone_Test_02()
    isMobilePhone_Test_03()
    isMongoId_Test()
    isMultibyte_Test()
    isNumeric_Test_01()
    isNumeric_Test_02()
    isOctal_Test()
    isPassportNumber_Test()
    isPort_Test()
    isPostalCode_Test()
    isRFC3339_Test()
    isRgbColor_Test_01()
    isRgbColor_Test_02()
    isSemVer_Test()
    isSurrogatePair_Test()
    isUppercase_Test()
    isSlug_Test()
    isStrongPassword_Test_01()
    isStrongPassword_Test_02()
    isTime_Test_01()
    isTime_Test_02()
    isTime_Test_03()
    isTime_Test_04()
    isTaxID_Test()
    isURL_Test_01()
    isURL_Test_02()
    isURL_Test_03()
    isURL_Test_04()
    isURL_Test_05()
    isURL_Test_06()
    isURL_Test_07()
    isURL_Test_08()
    isURL_Test_09()
    isURL_Test_10()
    isUUID_Test()
    isVariableWidth_Test()
    isVAT_Test()
    isWhitelisted_Test()
    matches_Test()
    blacklist_Test()
    escape_Test()
    ltrim_Test()
    normalizeEmail_Test_01()
    normalizeEmail_Test_02()
    normalizeEmail_Test_03()
    normalizeEmail_Test_04()
    normalizeEmail_Test_05()
    normalizeEmail_Test_06()
    normalizeEmail_Test_07()
    normalizeEmail_Test_08()
    normalizeEmail_Test_09()
    normalizeEmail_Test_10()
    normalizeEmail_Test_11()
    rtrim_Test()
    stripLow_Test() 
    toBoolean_Test_01()
    toBoolean_Test_02()
    toDate_Test()
    toFloat_Test()
    toInt_Test()
    trim_Test()
    unescape_Test()
    whitelist_Test()
    
} 
validatorRun()